<?  require_once $_SERVER['DOCUMENT_ROOT'] . '/../system/init.php';
    $hash = 'ifaj@*()($*o-kfas944-=53';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="/assets/scripts/jquery-1.7.2.js"></script>
    <script src="/assets/scripts/jquery.prettyPhoto.js"></script>
    <script src="/assets/scripts/jquery-ui-1.8.21.custom.min.js"></script>
    <script src="/assets/scripts/i18n/jquery-ui-i18n.js"></script>

    <link rel="stylesheet" type="text/css" media="all" href="/assets/styles/base.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/assets/styles/prettyPhoto.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/assets/styles/ui-lightness/jquery-ui-1.8.21.custom.css"/>

</head>
<body>
<script type="text/javascript">
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = 'http://stage.fotostrana.ru/fast/lostSon.php?h=<?=$hash?>&jsonp=checkLogin&r=' + Math.random();
    document.body.appendChild(s);

    function checkLogin(hash, hashId)
    {
        $.ajax({
            type: 'GET',
            url: '../ajax_userInit.php?hash='+hash+'&userId='+hashId,
            success: function (data) {
                if (data) {
                    $("#user-info").show();
                    $("#user-name").html(data.user_name);
                    $("#user-lastname").html(data.user_lastname);
                    $("#user-info").prepend('<img src='+data.photo.photo_url_48+' />')
                } else {
                    $("#user-info").hide();
                    location.reload();
                }
            }
        });
    }
</script>